1
2
3
4 package joeq.ClassLib.Common.java.security;
5
6 /***
7 * AccessController
8 *
9 * @author John Whaley <jwhaley@alum.mit.edu>
10 * @version $Id: AccessController.java 1451 2004-03-09 06:27:08Z jwhaley $
11 */
12 abstract class AccessController {
13
14 public static Object doPrivileged(java.security.PrivilegedAction action) {
15
16 return action.run();
17 }
18 public static Object doPrivileged(java.security.PrivilegedAction action,
19 java.security.AccessControlContext context) {
20
21 return action.run();
22 }
23 public static Object doPrivileged(java.security.PrivilegedExceptionAction action)
24 throws java.security.PrivilegedActionException {
25
26 try {
27 return action.run();
28 } catch (RuntimeException x) {
29 throw x;
30 } catch (Exception x) {
31 throw new java.security.PrivilegedActionException(x);
32 }
33 }
34 public static Object doPrivileged(java.security.PrivilegedExceptionAction action,
35 java.security.AccessControlContext context)
36 throws java.security.PrivilegedActionException {
37
38 try {
39 return action.run();
40 } catch (RuntimeException x) {
41 throw x;
42 } catch (Exception x) {
43 throw new java.security.PrivilegedActionException(x);
44 }
45 }
46 private static java.security.AccessControlContext getStackAccessControlContext() {
47
48 return null;
49 }
50 static java.security.AccessControlContext getInheritedAccessControlContext() {
51
52 return null;
53 }
54
55
56 }